﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:vm="clr-namespace:PokemonDataEditor.ViewModel"
                    xmlns:v="clr-namespace:PokemonDataEditor.View"
                    xmlns:pm="clr-namespace:PokemonBattle.PokemonData;assembly=PokemonData">

    <DataTemplate DataType="{x:Type pm:MoveData}">
        <StackPanel>
            <v:MoveView/>
        </StackPanel>
    </DataTemplate>
    <DataTemplate DataType="{x:Type pm:PokemonData}">
        <StackPanel>
            <v:PokemonView/>
        </StackPanel>
    </DataTemplate>

    <DataTemplate x:Key="DataItemHeader">
        <StackPanel Orientation="Horizontal">
            <TextBlock Text="{Binding Path=Name}" Margin="5,0" VerticalAlignment="Center"/>
            <Button Content="X" vm:WorkspaceViewModel.ClickToClose="True" Width="25" Height="25" Margin="5,0"/>
        </StackPanel>
    </DataTemplate>
    
    <Style x:Key="CommandMenu" TargetType="MenuItem">
        <Setter Property="Header" Value="{Binding Path=DisplayName}"/>
        <Setter Property="ItemsSource" Value="{Binding Path=Children}"/>
        <Setter Property="Command" Value="{Binding Path=Command}"/>
    </Style>
    
    <Style TargetType="TabItem" x:Key="DataItem">
        <Setter Property="Header" Value="{Binding Path=.}"/>
        <Setter Property="HeaderTemplate" Value="{StaticResource DataItemHeader}"/>
        <Setter Property="Content" Value="{Binding Path=.}"/>
    </Style>
    
</ResourceDictionary>